<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "etc_office_video_upload".
 *
 * @property int $id
 * @property string|null $code etc_user_tiktok_product_selected.code
 * @property int|null $selected_id etc_user_tiktok_product_selected.id
 * @property int|null $user_id 机构id，sys_adminuser.id
 * @property int|null $tiktok_id tiktok账号，etc_office_tiktok_account.id
 * @property string|null $video_link 视频链接
 * @property string|null $video_ad_code 广告投流码
 * @property string|null $video_time 视频发布时间
 * @property int|null $status 0未投放，1已投放
 */
class EtcOfficeVideoUpload extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'etc_office_video_upload';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['selected_id', 'user_id', 'tiktok_id','status'], 'integer'],
            [['video_link'], 'string'],
            [['video_time'], 'safe'],
            [['code', 'video_ad_code'], 'string', 'max' => 200],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'code' => Yii::t('app', 'etc_user_tiktok_product_selected.code'),
            'selected_id' => Yii::t('app', 'etc_user_tiktok_product_selected.id'),
            'user_id' => Yii::t('app', '机构id，sys_adminuser.id'),
            'tiktok_id' => Yii::t('app', 'tiktok账号，etc_office_tiktok_account.id'),
            'video_link' => Yii::t('app', '视频链接'),
            'video_ad_code' => Yii::t('app', '广告投流码'),
            'video_time' => Yii::t('app', '视频发布时间'),
        ];
    }
}
